using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Reclass
{
    /// <summary>
    /// <para>Reclass by Table</para>
    /// <para>Reclassifies (or changes) the values of the input cells of a raster using a remap table.</para>
    /// <para>使用重映射表对栅格输入像元的值进行重分类（或更改）。</para>
    /// </summary>    
    [DisplayName("Reclass by Table")]
    public class ReclassByTable : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ReclassByTable()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para>The input raster to be reclassified.</para>
        /// <para>要重新分类的输入栅格。</para>
        /// </param>
        /// <param name="_in_remap_table">
        /// <para>Input remap table</para>
        /// <para>Table holding fields defining value ranges to be reclassified and the values they will become.</para>
        /// <para>表保存字段定义要重新分类的值范围以及它们将成为的值。</para>
        /// </param>
        /// <param name="_from_value_field">
        /// <para>From value field</para>
        /// <para><xdoc>
        ///   <para>Field holding the beginning value for each value range to be reclassified.</para>
        ///   <para>This is a numeric field of the input remap table.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要重新分类的每个值范围的起始值的字段。</para>
        ///   <para>这是输入重映射表的数值字段。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_to_value_field">
        /// <para>To value field</para>
        /// <para><xdoc>
        ///   <para>Field holding the ending value for each value range to be reclassified.</para>
        ///   <para>This is a numeric field of the input remap table.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要重新分类的每个值范围的结束值的字段。</para>
        ///   <para>这是输入重映射表的数值字段。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_output_value_field">
        /// <para>Output value field</para>
        /// <para><xdoc>
        ///   <para>Field holding the integer values to which each range should be changed.</para>
        ///   <para>This is an integer field of the input remap table.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>保存每个范围应更改为的整数值的字段。</para>
        ///   <para>这是输入重映射表的整数字段。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output reclassified raster.</para>
        ///   <para>The output will always be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出对栅格进行了重新分类。</para>
        ///   <para>输出将始终为整数类型。</para>
        /// </xdoc></para>
        /// </param>
        public ReclassByTable(object _in_raster, object _in_remap_table, object _from_value_field, object _to_value_field, object _output_value_field, object _out_raster)
        {
            this._in_raster = _in_raster;
            this._in_remap_table = _in_remap_table;
            this._from_value_field = _from_value_field;
            this._to_value_field = _to_value_field;
            this._output_value_field = _output_value_field;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Reclass by Table";

        public override string CallName => "sa.ReclassByTable";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _in_remap_table, _from_value_field, _to_value_field, _output_value_field, _out_raster, _missing_values.GetGPValue()];

        /// <summary>
        /// <para>Input raster</para>
        /// <para>The input raster to be reclassified.</para>
        /// <para>要重新分类的输入栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Input remap table</para>
        /// <para>Table holding fields defining value ranges to be reclassified and the values they will become.</para>
        /// <para>表保存字段定义要重新分类的值范围以及它们将成为的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input remap table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_remap_table { get; set; }


        /// <summary>
        /// <para>From value field</para>
        /// <para><xdoc>
        ///   <para>Field holding the beginning value for each value range to be reclassified.</para>
        ///   <para>This is a numeric field of the input remap table.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要重新分类的每个值范围的起始值的字段。</para>
        ///   <para>这是输入重映射表的数值字段。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("From value field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _from_value_field { get; set; }


        /// <summary>
        /// <para>To value field</para>
        /// <para><xdoc>
        ///   <para>Field holding the ending value for each value range to be reclassified.</para>
        ///   <para>This is a numeric field of the input remap table.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要重新分类的每个值范围的结束值的字段。</para>
        ///   <para>这是输入重映射表的数值字段。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("To value field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _to_value_field { get; set; }


        /// <summary>
        /// <para>Output value field</para>
        /// <para><xdoc>
        ///   <para>Field holding the integer values to which each range should be changed.</para>
        ///   <para>This is an integer field of the input remap table.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>保存每个范围应更改为的整数值的字段。</para>
        ///   <para>这是输入重映射表的整数字段。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output value field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_value_field { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output reclassified raster.</para>
        ///   <para>The output will always be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出对栅格进行了重新分类。</para>
        ///   <para>输出将始终为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Change missing values to NoData</para>
        /// <para><xdoc>
        ///   <para>Denotes whether missing values in the reclass table retain their value or get mapped to NoData.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Signifies that if any cell location on the input raster contains a value not present or reclassed in a remap table, the value should remain intact and be written for that location to the output raster. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Signifies that if any cell location on the input raster contains a value not present or reclassed in a remap table, the value will be reclassed to NoData for that location on the output raster.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>表示重分类表中的缺失值是保留其值还是映射到 NoData。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 表示如果输入栅格上的任何像元位置包含重映射表中不存在或未重分类的值，则该值应保持不变，并将该位置的值写入输出栅格。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 表示如果输入栅格上的任何像元位置包含重映射表中不存在或未重分类的值，则该值将重分类为输出栅格上该位置的 NoData。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Change missing values to NoData")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _missing_values_value _missing_values { get; set; } = _missing_values_value._false;

        public enum _missing_values_value
        {
            /// <summary>
            /// <para>DATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DATA")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>NODATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NODATA")]
            [GPEnumValue("true")]
            _true,

        }

        public ReclassByTable SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}